#pragma once

#include "dxManager.h"
#include "Player.h"
#include "CardDataClass.h"

enum{BLACK, SILVER, BLUE, YELLOW, GREEN, ORANGE, PURPLE, RED};

bool InitBMPs(dxManager* dxMgr, IDirect3DSurface9* cardImages[], IDirect3DSurface9* colorImages[]);

void DrawCards(dxManager* dxMgr, Player& p1, Player& p2,
				const int& cardWidth, const int& cardHeight,
				const int* cardX, const int* cardY,
				const int& phase);

void DrawColor(dxManager* dxMgr, IDirect3DSurface9* crdImages[8],
			   const int& cardWidth, const int& cardHeight,
			   const int* cardX, const int* cardY);

void DrawPreview(dxManager* dxMgr, Player& player, const int& cursorMode,
				 const int& cardWidth, const int& cardHeight,
				 const int& handNum, const int& fieldNum);

void DrawCardOverlay(dxManager* dxMgr, LPDIRECT3DTEXTURE9 textureImage[2],
					 Player& p1, Player& p2, const int& p1Color, const int& p2Color);

void CardCheckForAmount(Player& player, const int& phase);

void InitColorVictory(Player& p1, Player& p2, int& color1, int& color2);

void CalculateVictoryColorPoint(Player& p1, Player& p2, int& p1Color1, int& p1Color2,
								int& p2Color1, int& p2Color2);

void PrintVictoryColor(dxManager* dxMgr, IDirect3DSurface9* colorImages[],
					   const int& p1Color1, const int& p1Color2,
					   const int& p2Color1, const int& p2Color2,
					   const int& color1, const int& color2);